package freelinz.smart.gwtex.client.ui;

public class Logger
{
    public native static boolean isEnabled() /*-{
     return $wnd.console && console.log;
     }-*/;
    public native static void setEnabed()/*-{
    
    }-*/;

    public native static void log(String message) /*-{
        if(@freelinz.smart.gwtex.client.ui.Logger::isEnabled())
        {
             $wnd.console.log(message);
        }
     }-*/;
    public native static void debug(String message)/*-{
            if(@freelinz.smart.gwtex.client.ui.Logger::isEnabled())
        {
        $wnd.console.debug(message);
        }
    }-*/;
    public native static void info(String message)/*-{
            if(@freelinz.smart.gwtex.client.ui.Logger::isEnabled())
        {
        $wnd.console.info(message);
        }
    }-*/;
    public native static void error(String message)/*-{
            if(@freelinz.smart.gwtex.client.ui.Logger::isEnabled())
        {
        $wnd.console.error(message);
        }
    }-*/;
    public native static void warn(String message)/*-{
            if(@freelinz.smart.gwtex.client.ui.Logger::isEnabled())
        {
        $wnd.console.warn(message);
        }
    }-*/;
}
